<%--
  Created by IntelliJ IDEA.
  User: xxz
  Date: 2021/7/13
  Time: 9:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"
      xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="../static/css/main.css">
    <title>商城</title>
</head>

<!--<body>-->
<!--<c:if test="${empty user}">-->
<!--    <div class="top-nav">-->
<!--        <div class="container clearf">-->
<!--            <div class="left">-->
<!--                <a href="" class="item">首页</a>-->
<!--            </div>-->

<!--            <div class="right">-->
<!--                <a href="${pageContext.request.contextPath}/Register.jsp" class="item">注册/登录</a>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
<!--</c:if>-->






<div style="background-color: #eee;">
    <form action="${pageContext.request.contextPath}/OrdersServlet?action=newoneOrder&uid=${user.id}&pid=${product.id}&buynum=${buynum}" name="car" method="post">
        <div class="container clearf">
            <div>收货地址</div>
            <HR align=center width=100% color=#dedede SIZE=1>

            <div class="col-2">姓名:${user.username}</div>
            <div class="col-6">电话:${user.tel}</div>
            <button class="col-2">修改</button>
            <div style="width: 100%">地址:${user.address}</div>
            <HR align=center width=100% color=#dedede SIZE=3>
            <div style="width: 100%">商品清单</div>

            <HR align=center width=100% color=#dedede SIZE=1>
        </div>

        <div class="container clearf">
            <div class="col-5">
                <table>
                    <tr>

                            <td>
                                <input type="hidden" name="ppid" value="${product.id}">
                                <img src="${pageContext.request.contextPath}/img/${product.picture}" width="80" height="50">${product.name}<br>
                                <div class="col-1" style="color: black">单价：${product.price}</div>
                                <div class="col-1">数量x${buynum}</div>
                                <div class="col-1" style="color: red">${product.price*buynum}</div>
                            </td>
                    </tr>
                </table>

            </div>

            <HR align=center width=100% color=#dedede SIZE=1>
        </div>

        <div class="container clearf">
            <HR align=center width=100% color=#dedede SIZE=3>
            <div class="col-7" style="text-align: right">
                共件${buynum}商品，总计金额${product.price*buynum}
            </div>
            <div class="col-3" style="text-align:right">${product.price*buynum}</div>
            <div class="col-7" style="text-align:right">运费(包邮)</div>
            <div class="col-3" style="text-align:right;">￥0</div>
            <HR align=center width=100% color=#dedede SIZE=3>


            <div style="float: right">
                <div>支付方式</div>
                <select name="pay">
                    <option value="1">支付宝</option>
                    <option value="2">微信</option>
                    <option value="3">银行卡</option>
                </select>
            </div>
            <HR align=center width=100% color=#dedede SIZE=3>
            <div style="float: right">
                <div class="col-6">应付金额</div>
                <div class="col-4" style="text-align: left">${product.price*buynum}</div>
            </div>
            <HR align=center width=100% color=#dedede SIZE=3>
            <button type="submit" style="float: right">提交订单</button>
        </div>
    </form>
</div>


<div class="footer">
    <div class="container clearf">
        <div class="">© 2021 版权所有 粤ICP备11111111号 |隐私政策|用户使用协议|资质证照|知识产权</div>
    </div>
</div>

</body>
</html>
